Skip to content

Improve list for multi-config setups - #86

Open
Morikko wants to merge 3 commits into
KenKundert:masterfrom
Morikko:improve-list-command
Open

Morikko wants to merge 3 commits into
KenKundert:masterfrom
Morikko:improve-list-command

Conversation

@Morikko

@Morikko Morikko commented Nov 4, 2026

Copy link
Copy Markdown

Changes:

  • list runs on every subconfig.. Composite configs behave the
    same way as for create, check, and similar commands. I did not see a reason to restrict that command as opposed to other ones with a specific archive required where it is unlikely to have the same archive name among different repo.

  • --config accepts a comma-separated list, e.g.
    emborg --config home,work list. Each entry can be a single config
    or a group. Duplicates are removed and order is kept, so
    --config test0,tests lists test0 once. Unknown names still fail
    with the usual "Choose from:" hint. This works for every command,
    not just list. I have 10 configs, the all group is obvious but any other combination is a matter of context.

  • list --first N / --last N are passed through to borg list.
    Borg won't accept both together, so emborg rejects that combination
    before it runs any config, hook, or borg command.

Behavior notes:

  • More than one config listed in --config counts as a composite
    config. Commands that reject composites (delete, diff, …) still
    reject it.

  • A single name in --config behaves exactly as before.

Code quality: all changes are tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant